package ch.fhnw.apsi.beans;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class ErrorMessage {
  public ErrorMessage() {
    // empty no-arg C'tor
  }

  public ErrorMessage(final Integer status, final String error) {
    this.error = error;
    this.status = status;
  }

  private Integer status = 400;
  private String error = "Unknown error.";

  @Nonnull
  public Integer getStatus() {
    return this.status;
  }

  public void setStatus(@Nullable final Integer status) {
    if (status != null)
      this.status = status;
  }

  @Nonnull
  public String getError() {
    return this.error;
  }

  public void setError(@Nullable final String error) {
    if (error != null)
      this.error = error;
  }
}
